package com.smrs.asn.enums;

import java.util.HashMap;
import java.util.Map;

import com.smrs.relationship.enums.CustomerLevelEnum;

/**
 * 部门状态枚举列表
 * @author Jonathan
 *
 */
public enum AsnTypeEnum {
	normal(10,"正常"),withdraw(20,"返回"),check(30,"盘点"),lose(40,"报损");
	
	private static final Map<Integer, AsnTypeEnum> CACHE = new HashMap<Integer, AsnTypeEnum>(){
		private static final long serialVersionUID = -8986866330615001847L;
		{
			for(AsnTypeEnum enu : AsnTypeEnum.values()){
				put(enu.id, enu);
			}
		}
	};
	public static AsnTypeEnum toEnum(Integer status){
		return CACHE.get(status);
	}
	
	private Integer id;
	private String name;
	private AsnTypeEnum(Integer status, String description) {
		this.id = status;
		this.name = description;
	}
	
	public Integer getId() {
		return id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	
	public String getName() {
		return name;
	}
	
	
}
